﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Alma.Infrastructure;
using Alma.Enums;
using System.Data.Linq.Mapping;

namespace Alma.Models
{
    [Table(Name = "CareerObjs")]
    public class CareerObjectiveInfo : NotificationObject
    {
        public CareerObjectiveInfo() { }

        public CareerObjectiveInfo(AccountInfo account)
        {
            AccountGuid = account.Guid;
        }

        public CareerObjectiveInfo(string _accountGuid)
        {
            AccountGuid = _accountGuid;
        }

        #region Fields
        private int id;
        private string accountGuid;
        private EmploymentTypeValue employmentType = EmploymentTypeValue.FullTime;
        private string location;
        private string industry;
        private string jobCategory;
        private string targetSalary = "0-1000";
        private int gangTime = 30;
        #endregion

        #region Properties
        [Column(Name = "Id", IsPrimaryKey = true, CanBeNull = false, IsDbGenerated = true, DbType = "INT NOT NULL Identity", AutoSync = AutoSync.OnInsert)]
        public int Id
        {
            get { return id; }
            set
            {
                id = value;
                RaisePropertyChanged(() => Id);
            }
        }

        /// <summary>
        /// 
        /// </summary>
        [Column]
        public string AccountGuid
        {
            get { return accountGuid; }
            set
            {
                accountGuid = value;
                RaisePropertyChanged(() => AccountGuid);
            }
        }

        /// <summary>
        /// 工作类型
        /// </summary>
        public EmploymentTypeValue EmploymentType
        {
            get { return employmentType; }
            set
            {
                employmentType = value;
                RaisePropertyChanged(() => EmploymentType);
            }
        }

        /// <summary>
        /// 工作地点
        /// </summary>
        [Column]
        public string Location
        {
            get { return location; }
            set
            {
                location = value;
                RaisePropertyChanged(() => Location);
            }
        }

        /// <summary>
        /// 行业
        /// </summary>
        [Column]
        public string Industry
        {
            get { return industry; }
            set
            {
                industry = value;
                RaisePropertyChanged(() => Industry);
            }
        }

        /// <summary>
        /// 职能
        /// </summary>
        [Column]
        public string JobCategory
        {
            get { return jobCategory; }
            set
            {
                jobCategory = value;
                RaisePropertyChanged(() => JobCategory);
            }

        }

        /// <summary>
        /// 期望月薪
        /// </summary>
        [Column]
        public string TargetSalary
        {
            get { return targetSalary; }
            set
            {
                targetSalary = value;
                RaisePropertyChanged(() => TargetSalary);
            }
        }

        /// <summary>
        /// 到岗时间
        /// </summary>
        [Column]
        public int GangTime
        {
            get { return gangTime; }
            set
            {
                gangTime = value;
                RaisePropertyChanged(() => GangTime);
            }
        }
        #endregion
    }
}
